<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of generateSdpVarL</title>
  <meta name="keywords" content="generateSdpVarL">
  <meta name="description" content="Generate a number equal to numberOfLToBeDone of sdpvar() Matrix starting from matrix L.">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html v1.5 &copy; 2003-2005 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../m2html.css">
</head>
<body>
<a name="_top"></a>
<div><a href="../index.html">Home</a> &gt;  <a href="index.html">source</a> &gt; generateSdpVarL.m</div>

<!--<table width="100%"><tr><td align="left"><a href="../index.html"><img alt="<" border="0" src="../left.png">&nbsp;Master index</a></td>
<td align="right"><a href="index.html">Index for source&nbsp;<img alt=">" border="0" src="../right.png"></a></td></tr></table>-->

<h1>generateSdpVarL
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>Generate a number equal to numberOfLToBeDone of sdpvar() Matrix starting from matrix L.</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>function [ sdpL ] = generateSdpVarL( L, numberOfLToBeDone ) </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre class="comment">Generate a number equal to numberOfLToBeDone of sdpvar() Matrix starting from matrix L.

Generate a number equal to numberOfLToBeDone of Sdpvar Matrix starting
from matrix L.

Prototype: [sdpL] = generateSdpVarL(L, numberOfLToBeDone)

Input:     L - Syms matrix of L
           numberOfLToBeDone - Number of L to create depending of affine
                               parameters.

Output:    sdpL - Sdpvar version of L</pre></div>

<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../matlabicon.gif)">
<li><a href="lookForVariableIndex.html" class="code" title="function [ index ] = lookForVariableIndex( variableToFind, allVariables )">lookForVariableIndex</a>	This function return the index of variableToFind in vector allVariables, that exsists for construction.</li><li><a href="strsplit.html" class="code" title="function parts = strsplit( splitstr, str, option )">strsplit</a>	Split string into pieces.</li></ul>
This function is called by:
<ul style="list-style-image:url(../matlabicon.gif)">
<li><a href="robLySearch.html" class="code" title="function [] = robLySearch( A, m )">robLySearch</a>	Calculate the stability of a system whit Homogeneous Lyapunov function.</li></ul>
<!-- crossreference -->



<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre>0001 <span class="comment">%Generate a number equal to numberOfLToBeDone of sdpvar() Matrix starting from matrix L.</span>
0002 <span class="comment">%</span>
0003 <span class="comment">%Generate a number equal to numberOfLToBeDone of Sdpvar Matrix starting</span>
0004 <span class="comment">%from matrix L.</span>
0005 <span class="comment">%</span>
0006 <span class="comment">%Prototype: [sdpL] = generateSdpVarL(L, numberOfLToBeDone)</span>
0007 <span class="comment">%</span>
0008 <span class="comment">%Input:     L - Syms matrix of L</span>
0009 <span class="comment">%           numberOfLToBeDone - Number of L to create depending of affine</span>
0010 <span class="comment">%                               parameters.</span>
0011 <span class="comment">%</span>
0012 <span class="comment">%Output:    sdpL - Sdpvar version of L</span>
0013 
0014 <a name="_sub0" href="#_subfunctions" class="code">function [ sdpL ] = generateSdpVarL( L, numberOfLToBeDone )</a>
0015 
0016 variables = <a href="strsplit.html" class="code" title="function parts = strsplit( splitstr, str, option )">strsplit</a>(<span class="string">','</span>,findsym(L));
0017 
0018 <span class="keyword">for</span> t = 1:numberOfLToBeDone
0019     sdpL{t} = <span class="string">'['</span>;
0020     <span class="keyword">for</span> i = 1:length(L)
0021         <span class="keyword">for</span> j = 1:length(L)
0022             currentVariables =  <a href="strsplit.html" class="code" title="function parts = strsplit( splitstr, str, option )">strsplit</a>(<span class="string">','</span>,findsym(L(i,j)));
0023             currentRow = strrep(char(L(i,j)), <span class="string">' '</span>, <span class="string">''</span>);
0024             <span class="keyword">if</span> cellfun(@isempty,currentVariables)==false
0025                 <span class="keyword">for</span> k = 1:length(currentVariables)
0026                     counter = <a href="lookForVariableIndex.html" class="code" title="function [ index ] = lookForVariableIndex( variableToFind, allVariables )">lookForVariableIndex</a>(currentVariables(k),variables);
0027                     currentRow = strrep(currentRow,char(currentVariables(k)),strcat(<span class="string">'alfa{'</span>,num2str(counter*t),<span class="string">'}'</span>));
0028                 <span class="keyword">end</span>
0029             <span class="keyword">end</span>
0030             sdpL{t} = [sdpL{t}, currentRow, <span class="string">' '</span>];
0031         <span class="keyword">end</span>
0032         <span class="keyword">if</span> i ~= length(L)
0033             sdpL{t} = strcat(sdpL{t},<span class="string">';'</span>);
0034         <span class="keyword">end</span>
0035     <span class="keyword">end</span>
0036     sdpL{t} = strcat(sdpL{t},<span class="string">']'</span>);
0037 <span class="keyword">end</span>
0038 
0039 <span class="keyword">return</span>;
0040 
0041 <span class="keyword">end</span></pre></div>
<hr><address>Generated on Mon 12-Oct-2009 21:15:56 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address>
</body>
</html>